﻿@page
@{ Layout = "_Layout"; }

@section Styles{
    <style>

        .el-tree-node {
            white-space: normal;
            outline: 0;
            .el-tree-node__content

        {
            text-align: left;
            align-items: start;
            height: 100%;
            .el-tree-node

        {
            white-space: normal;
            outline: 0;
            .el-tree-node__content

        {
            text-align: left;
            align-items: start;
            height: 100%;
        }

        }
        }
        }
        
    </style>
}
<el-card>
    <div slot="header" class="clearfix">
        <span>{{ title }}</span>
        <el-button style="float: right;padding:3px 0;" type="text" v-on:click="utils.closeLayerSelf"><i class="el-icon-close"></i></el-button>
    </div>
    <el-row :gutter="18">
        <el-col :span="6">
            <el-card shadow="hover">
                <el-form :size="euiSize">
                    <el-form-item label="">
                        <el-input placeholder="输入关键字进行过滤"
                                  v-model="filterText" prefix-icon="el-icon-search" clearable>
                        </el-input>
                    </el-form-item>
                </el-form>
                <el-scrollbar class="scrollbar" :style="{height: $(window).innerHeight()-260 + 'px'}">
                    <el-tree class="filter-tree"
                             :data="organs"
                             v-on:node-click="btnTreeClick"
                             node-key="id"
                             accordion
                             :props="defaultProps"
                             :filter-node-method="filterNode"
                             ref="tree">
                    </el-tree>
                </el-scrollbar>
            </el-card>
        </el-col>
        <el-col :span="18">
            <el-form v-on:submit.native.prevent :inline="true" :model="form" :size="euiSize">
                <el-form-item label="关键字">
                    <el-input v-model="form.keyword" placeholder="关键字"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" v-on:click="btnSearchClick">查询</el-button>
                    <el-button :size="euiSize" plain type="primary" icon="el-icon-plus" v-on:click="btnRangeClick">
                        安 排
                    </el-button>
                </el-form-item>
            </el-form>

            <el-table :data="list" :size="euiSize" ref="userTable" v-on:selection-change="handleSelectionChange"
                      style="width: 100%" :height="$(window).innerHeight()-260">
                <el-table-column type="selection" :selectable="selectable"
                                 width="55">
                </el-table-column>
                <el-table-column label="账号">
                    <template slot-scope="scope">
                        <el-link :underline="false" type="primary" v-on:click="btnViewClick(scope.row.id)">{{scope.row.userName}}</el-link>
                    </template>
                </el-table-column>
                <el-table-column prop="displayName"
                                 label="姓名">
                </el-table-column>
                <el-table-column
                                 prop="organNames"
                                 label="组织">
                </el-table-column>
                <el-table-column label="" align="right" width="100">
                    <template slot-scope="scope">
                        <el-tag type="success" size="mini" v-if="scope.row.isRange">已安排</el-tag>
                        <el-tag type="info" size="mini" v-else>待安排</el-tag>
                    </template>
                </el-table-column>
                @await Html.PartialAsync("_PartialTableEmpty")
            </el-table>

            <div style="text-align: center; margin-top: 10px;">
                <el-pagination v-on:current-change="handleCurrentChange" background
                               :current-page="form.pageIndex"
                               :page-size="form.pageSize"
                               layout="total, prev, pager, next"
                               :total="total">
                </el-pagination>
            </div>
            </el-col></el-row>

</el-card>
<el-row align="center" style="margin-top:18px;">
    <el-col :span="24" align="center">
        <el-button icon="el-icon-close" :size="euiSize" v-on:click="utils.closeLayerSelf">关 闭</el-button>
    </el-col>
</el-row>
@section Scripts{
    <script src="/sitefiles/assets/js/admin/common/usersRange.js" type="text/javascript"></script>
}